import { orderType } from "@/type/coffeeType";
import { CoffeeOutlined } from "@ant-design/icons";
import { Button } from "antd";
import React, { FC, memo, useState } from "react";
import ShowCar from "./showCar";
import { FixCarWrapper } from "./style";

interface IProps{
  coffeeOrder:orderType[]
}

const FixCar:FC<IProps> = memo((props) => {
  const {coffeeOrder}= props

  const [isShow, setShow] = useState(false);

  const change = () => {
    setShow(true);
  };
  return (
    <FixCarWrapper>
      <Button
        className="btn"
        onClick={() => {
          change();
        }}
      >
        <CoffeeOutlined style={{fontSize:50}} />
      </Button>
      <ShowCar isShow={isShow} foo={setShow} coffeeCar={coffeeOrder} />
    </FixCarWrapper>
  );
});

export default FixCar;
